package com.sanweibook.jhook.biz.sys.impl;

import com.sanweibook.jhook.biz.CrudService;
import com.sanweibook.jhook.biz.sys.SysUserRoleService;
import com.sanweibook.jhook.dal.dao.sys.SysUserRoleDao;
import com.sanweibook.jhook.dal.model.sys.SysUserRole;
import com.sanweibook.jhook.dal.page.Page;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* Created by twg on 17/3/16.
*/
@Service
public class SysUserRoleServiceImpl extends CrudService<SysUserRoleDao,SysUserRole> implements SysUserRoleService {

    @Override
    public void delete(SysUserRole sysUserRole) {
        delete(sysUserRole,"sysUserRole:*");
    }

    @Override
    public void deleteById(Long id) {
        deleteById(id,"sysUserRole:*");
    }

    @Override
    public void deletedByIds(List<Long> ids) {
        deleteByIds(ids,"sysUserRole:*");
    }

    @Override
    public SysUserRole get(SysUserRole sysUserRole) {
        return get(sysUserRole,"sysUserRole:get");
    }

    @Override
    public SysUserRole getById(Long id) {
        return getById(id,"sysUserRole:getbyid");
    }

    @Override
    public void save(SysUserRole sysUserRole) {
        insert(sysUserRole,"sysUserRole:*");
    }

    @Override
    public void batchSave(List<SysUserRole> sysUserRole) {
        batchInsert(sysUserRole,"sysUserRole:*");
    }

    @Override
    public void update(SysUserRole sysUserRole) {
        update(sysUserRole,"sysUserRole:*");
    }

    @Override
    public int queryCount(SysUserRole sysUserRole) {
        return queryCount(sysUserRole,"sysUserRole:querycount");
    }

    @Override
    public List<SysUserRole> queryAll(SysUserRole sysUserRole) {
        return queryAll(sysUserRole,"sysUserRole:queryall");
    }

    @Override
    public List<SysUserRole> queryByIds(List<Long> ids) {
        return queryByIds(ids,"sysUserRole:querybyids");
    }

    @Override
    public Page<SysUserRole> queryByPages(SysUserRole sysUserRole) {
        return queryByPage(sysUserRole);
    }
}
